﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Data.Linq;

namespace Wwtfly.CHY.Model
{
    public class ChyData : DataContext
    {
        public static ChyData ChyDB;
        private static string _connectString = "isostore:/chyDB.sdf";
            
        public ChyData(string connectString)
            : base(connectString)
        {
       
        }

        public static void GetDataContext()
        {
            ChyData chy = new ChyData(_connectString);

            if (!chy.DatabaseExists())
            {
                chy.CreateDatabase();
            }

            ChyData.ChyDB = chy;
        }

        /// <summary>
        /// 用户信息
        /// </summary>
        public Table<UserInfo> UserInfo;
        
    }
}
